<template>
	<view class="container" :style="appThemeStyle">
		<u-navbar :back-icon-color="appTheme.mainText" :background="{backgroundColor:appTheme.pageBg}"></u-navbar>
		<view class="u-text-center u-font-36">
			<text>{{title}}</text>
		</view>
		<view class="content">
			<u-parse :html="content" :tag-style="{img:'margin:0;padding:0;display:block;'}"></u-parse>
		</view>
	</view>
</template>

<script>
	import * as Api from '@/api/agreement'
	export default {
		data() {
			return {
				name: '',
				title: '',
				content: ''
			}
		},
		onLoad(options) {
			this.name = options.name ?? ''
			let app = this
			Api.data(app.name).then(data => {
				app.title = data.title
				app.content = data.content
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 40rpx;
		overflow: hidden;
		word-wrap: break-word!important;
	}
</style>
